---@class ExpeditionMapTipPanel : UIComponentBase
local ExpeditionMapTipPanel = Class("",UIComponentBase)
local t = ExpeditionMapTipPanel

function t:OnCreate()
    --self.ctrlStar = self:GetController("star")
    self.exAddText = self:GetChild("RewardNumber")
    self.mapTipText = self:GetChild("MapTips")
    self.nameText = self:GetChild("Name")
end

function t:OnEnable()

end
function t:OnDisable()
end
function t:OnDestroy()
end

function t:Refresh(mapId)
    local info = logicMgr.ExpeditionMgr.GetMapInfo(mapId)
    if not info then return end

    --self.ctrlStar.selectedIndex = 0
    local cfg = dataTable.getDataTableById("t_expeditionchapter",mapId)
    if cfg then
        local str = dataTable.getDataTableByStringId("t_global",131,"f_string_value")
        --local addTb = decodeJsonStrToTabel(str)
        --local add = addTb[info.difficulty][2]
        --self.exAddText.text = string.format("%d%%",add*100)
        self.mapTipText.text = getLanguage(cfg.f_MapTips)
        self.nameText.text = getLanguage(cfg.f_MapName)
    end

end

return t